package 数组.easy;

import java.util.Arrays;

/**
 * @author Lw中
 * @date 2020/8/5 10:07
 */
public class YiSanSilu {

    public static boolean checkIfExist(int[] arr) {
        int[] res = Arrays.copyOf(arr, arr.length);
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < res.length; j++) {
                if (i != j) {
                    if (arr[i] == 2*res[j] || res[j] == 2*arr[i]) {
                            return true;
                    }
                }
            }
        }
        return false;
    }

    public static void main(String[] args) {
        int[] arr = {-2,0,10,-19,4,6,-8};
        System.out.println(checkIfExist(arr));
    }

}
